
	<!-- Page title -->
	<div id="pagetitle">
		<div class="wrapper">
			<h1>Accounting &rarr; <span>Entries</span></h1>
			<!--form action="" method="get"><input class="" type="text" id="q" name="q" /></form-->
		</div>
	</div>
	<!-- End of Page title -->
	
	<!-- Page content -->
	<div id="page">
		<!-- Wrapper -->
		<div class="wrapper">
		
			<p>&nbsp;</p>			
					
            <div class="leading clearfix">	
            	<!-- Message -->
                <div id="message-box" class="box hidden"></div>			
			
				<!-- Search Entry -->
                <div class="column width2 first">
                    <div class="overview content-box corners">
                        <header>
                            <h3><img src="<?= $this->config->item('webroot') ?>images/icons/information.png" alt="" />Search</h3>
                        </header>
                        <section>
							<!-- Search Keyword and Filters -->
							<table class="no-style inner-width2">
								<tbody>
									<tr>
										<td>
											<input type="text" class="inner-width2 title" name="search_keyword" value="" />
										</td>
									</tr>
									<tr>
										<td>
											<label>Filters:</label>
										</td>
									</tr>
									<tr>
										<td>
											<label id="search-filter-all" class="search-filters choice"><input type="checkbox" value="" />All</label>
										</td>
									</tr>
									<tr>
										<td>
											<label class="choice"><input id="search-filter-po" class="search-filters" type="checkbox" />PO #</label>
										</td>
									</tr>
									<tr>
										<td>
											<label class="choice"><input id="search-filter-or" class="search-filters" type="checkbox" value="" />OR #</label>
										</td>
									</tr>
									<tr>
										<td>
											<label class="choice"><input id="search-filter-rfq" class="search-filters" type="checkbox" value="" />RFQ #</label>
										</td>
									</tr>
									<tr>
										<td>
											<label class="choice"><input id="search-filter-dr" class="search-filters" type="checkbox" value="" />Delivery Receipt #</label>
										</td>
									</tr>
									<tr>
										<td>
											<label class="choice"><input id="search-filter-description" class="search-filters" type="checkbox" value="" checked="checked" />Description</label>
										</td>
									</tr>
									<tr>
										<td>
											<label>From</label><br />
											<input class="field-from-date full" type="text" value="" />
										</td>
									</tr>
									<tr>
										<td>
											<label>To</label><br />
											<input class="field-to-date full" type="text" value="" />
										</td>
									</tr>
									<tr>
										<td>
											<a id="search-entry" class="btn btn-blue">Search</a>
										</td>
									</tr>
								</tbody>
							</table>	
							<!-- End of Search Keyword and Filters -->		
                        </section>
                    </div>                    
                </div>
                <!-- End of Search Entry -->
				
				<!-- Results -->
                <div id="results_div" class="column width6">
                    
                    <div class="content-box corners">
                        <header>
                            <h3><img src="<?= $this->config->item('webroot') ?>images/icons/information.png" alt="" />Accounting Entries</h3>
                        </header>
                        <section>
							<div id="entry_list" class="dataTables_wrapper">
								
								<div id="entry_list_count" class="dataTables_length">
									Show
									<select name="entry_list_count" size="1">
										<option value="10">10</option>
										<option value="25">25</option>
										<option value="50">50</option>
										<option value="100">100</option>
										<option value="all">All</option>
									</select>
									entries									
								</div>
								
								<div id="entry_list_paginate" class="dataTables_paginate paging_two_button" class="dataTables_paginate">
									<div id="entry_list_previous" class="paginate_disabled_previous" title="Previous"></div>
									<div id="entry_list_next" class="paginate_disabled_next" title="Next"></div>
								</div>
								
								<table id="entry-list-table" class="display stylized full">
									<thead>
										<th></th>
                                        <th>Entry Date</th>
										<th>Description</th>
										<th>Compnay Name</th>
										<th>PO #</th>
                                        <th>RFQ #</th>
									</thead>
									<tbody>
                                            
                                        <?php 
											$count = 0;		
											foreach($acctg_entries as $acctg_entry_id => $data) : 
											if( $count%2 == 0) {
												echo "<tr class='gradeA odd'>";
											}
											else {
												echo "<tr class='gradeA even'>";
											}
											$count++;
										?>
                                            
                                                <td>
                                                    <!--a href="#popup-view" class="nyroModal" rev="modal"><span class="icon icon-magnifier" title="View">&nbsp;</span></a-->
                                                    <a href="<?= $this->config->item('base_url') ?>accounting/edit_entry/<?= $acctg_entry_id ?>"><span class="icon icon-pencil" title="Edit">&nbsp;</span></a>
                                                   <!-- <a class="button-edit-entry" id="<?= 'button-edit-entry_'. $acctg_entry_id; ?>" href="#"><span class="icon icon-pencil" title="Edit">&nbsp;</span></a>-->
                                                </td>        
                                                <td class="title">
                                                	 <div>
                                                        <a href="#"><b><?= $data['entry_date']; ?></b></a>
                                                        <div class="listingDetails">
                                                            <div class="pad">
                                                                RFQ #: <label><?= $data['customer_rfq_num']; ?></label><br />
                                                                OR  #: <label><?= $data['official_receipt_num']; ?></label></label><br />
                                                                Delivery Receipt #: <label><?= $data['delivery_receipt_num']; ?></label></label><br />
                                                                <a href="#popup-view" class="nyroModal" rev="modal">View More</a>
                                                            </div>
                                                        </div>		
                                                    </div>
                                                </td>                                    
                                                <td><?= $data['description']; ?></td>	
                                                <td><?= $data['company_name']; ?></td>
                                                <td><?= $data['new_po_num']; ?></td>
                                                <td><?= $data['new_rfq_num']; ?></td>
                                            </tr>                                            
                                            <?php endforeach; ?>
									</tbody>
									<tfoot>
										<th></th>
                                        <th>Entry Date</th>
										<th>Description</th>
										<th>Compnay Name</th>
										<th>PO #</th>	
                                        <th>RFQ #</th>
									</tfoot>
								</table>

								<div id="entry_list_info" class="dataTables_info">
									Showing 1 to 5 of n entries.
								</div>
								
								<div id="entry_list_paginate" class="dataTables_paginate paging_two_button">
									<div id="entry_list_previous" class="paginate_disabled_previous" title="Previous"></div>
									<div id="entry_list_next" class="paginate_disabled_next" title="Next"></div>
								</div>
								
							</div>
                        </section>
						
                    </div>                
                </div>
				<!-- End of Results -->
								           
            </div>									
		</div>
		<!-- End of Wrapper -->
		
		<!-- Popup - View Entry -->
		<?php include("popup_view_entry.php"); ?>
		<!-- End of Popup - View Entry -->
		
	</div>
	<!-- End of Page content -->
	
	<script type="text/javascript" src="<?= $this->config->item('webroot') ?>scripts/application/accounting.js"></script>